package com.wm.wmim.connect.ws.rpcinvoke;

import com.wm.wmim.common.dto.RpcRespDTO;
import com.wm.wmim.server.api.bo.resp.UserInfoBO;
import com.wm.wmim.server.api.rpc.UserInfoRpcService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

/**
 * @author weiming
 * @date 2024/8/24 23:16
 * @description
 */
@Service
public class UserInfoRpcInvokeService {

    @DubboReference(version = "1.0.0", check = false)
    private UserInfoRpcService userInfoRpcService;

    public UserInfoBO loginCheck(String userCode){
        RpcRespDTO<UserInfoBO> booleanRpcRespDTO = userInfoRpcService.loginCheck(userCode);
        if (booleanRpcRespDTO != null && booleanRpcRespDTO.isSuccess()){
            return  booleanRpcRespDTO.getData();
        }
        return null;
    }


}
